package framework.eea.state;

import framework.eea.StateBasedGame;
import framework.eea.entity.EntityManager;
import framework.eea.exception.EEAException;
import framework.eea.gui.JFrameGameContainer;
import framework.eea.gui.Graphics;

/**
 *
 * @author Markus Schr&ouml;der
 */
public abstract class GameState {

    public abstract int getID();

    public void init(JFrameGameContainer gc, StateBasedGame sbg) throws EEAException {
    
    }

    public void render(JFrameGameContainer gc, StateBasedGame sbg, Graphics g) throws EEAException {
        EntityManager.getInstance().renderEntities(gc, sbg, g);
    }

    public void update(JFrameGameContainer gc, StateBasedGame sbg, int delta) throws EEAException {
        EntityManager.getInstance().updateEntities(gc, sbg, delta);
    }

    public void enter(JFrameGameContainer gc, StateBasedGame sbg) throws EEAException {
    
    }

    public void leave(JFrameGameContainer gc, StateBasedGame sbg) throws EEAException {
    
    }
    
}
